
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../application.dart';
import '../widgets/themes/app_theme.dart';
import '../widgets/will_pop_scope_route.dart';
import 'member/index.dart';

/// 抽屉首页效果
class IndexMain extends StatelessWidget {
  const IndexMain({Key? key}) : super(key: key);



  @override
  Widget build(BuildContext context) {
    // 使用 MultiProvider 进行多页面共享状态数据
    return ScreenUtilInit(  //是一个屏幕适配方案，让你的UI在不同尺寸的屏幕上都能显示合理的布局!
      designSize: const Size(AppTheme.wdp, AppTheme.hdp),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (context, child) {
        return  const MaterialApp(
          // 网格
          debugShowMaterialGrid: false,
          // Debug标志
          debugShowCheckedModeBanner: false,
          // 打开性能监控，覆盖在屏幕最上面
          showPerformanceOverlay: false,
          // 语义视图（无障碍）
          showSemanticsDebugger: false,
          // 主题
          themeMode: ThemeMode.system,
          title: '抽屉案例',
          home: WillPopScopeRoute(
            child: MenuPage(key: Key('widget_menu_page')),
          ),
        );
      },
    );
  }
}


